#include <stdio.h>

int main(void){
	char c;
	int flag = 1,n=0,s=0;
	while ((c=getchar()) != EOF){
		s += flag*(c-'a'+1);
		flag *= -1;
		n++;
	}
	printf("%.3f", 1.0*s/n);
	return 0;
}
